Optimal. Leaf size=100 \[ \frac {x}{a^2}-\frac {(3 a-2 b) \sqrt {b} \text {ArcTan}\left (\frac {\sqrt {a-b} \tanh (c+d x)}{\sqrt {b}}\right )}{2 a^2 (a-b)^{3/2} d}+\frac {b \coth (c+d x)}{2 a (a-b) d \left (a-b+b \coth ^2(c+d x)\right )} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.10, antiderivative size = 100, normalized size of antiderivative = 1.00, number of steps
used = 5, number of rules used = 5, integrand size = 14, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.357, Rules used = {4213, 425, 536,
212, 211} \begin {gather*} -\frac {\sqrt {b} (3 a-2 b) \text {ArcTan}\left (\frac {\sqrt {a-b} \tanh (c+d x)}{\sqrt {b}}\right )}{2 a^2 d (a-b)^{3/2}}+\frac {x}{a^2}+\frac {b \coth (c+d x)}{2 a d (a-b) \left (a+b \coth ^2(c+d x)-b\right )} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 211
Rule 212
Rule 425
Rule 536
Rule 4213
Rubi steps
\begin {align*} \int \frac {1}{\left (a+b \text {csch}^2(c+d x)\right )^2} \, dx &=\frac {\text {Subst}\left (\int \frac {1}{\left (1-x^2\right ) \left (a-b+b x^2\right )^2} \, dx,x,\coth (c+d x)\right )}{d}\\ &=\frac {b \coth (c+d x)}{2 a (a-b) d \left (a-b+b \coth ^2(c+d x)\right )}-\frac {\text {Subst}\left (\int \frac {-2 a+b+b x^2}{\left (1-x^2\right ) \left (a-b+b x^2\right )} \, dx,x,\coth (c+d x)\right )}{2 a (a-b) d}\\ &=\frac {b \coth (c+d x)}{2 a (a-b) d \left (a-b+b \coth ^2(c+d x)\right )}+\frac {\text {Subst}\left (\int \frac {1}{1-x^2} \, dx,x,\coth (c+d x)\right )}{a^2 d}+\frac {((3 a-2 b) b) \text {Subst}\left (\int \frac {1}{a-b+b x^2} \, dx,x,\coth (c+d x)\right )}{2 a^2 (a-b) d}\\ &=\frac {x}{a^2}-\frac {(3 a-2 b) \sqrt {b} \tan ^{-1}\left (\frac {\sqrt {a-b} \tanh (c+d x)}{\sqrt {b}}\right )}{2 a^2 (a-b)^{3/2} d}+\frac {b \coth (c+d x)}{2 a (a-b) d \left (a-b+b \coth ^2(c+d x)\right )}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.47, size = 199, normalized size = 1.99 \begin {gather*} \frac {(-a+2 b+a \cosh (2 (c+d x))) \text {csch}^4(c+d x) \left ((a-2 b) \left (-2 (a-b)^{3/2} (c+d x)+(3 a-2 b) \sqrt {b} \text {ArcTan}\left (\frac {\sqrt {a-b} \tanh (c+d x)}{\sqrt {b}}\right )\right )+a \left (2 (a-b)^{3/2} (c+d x)+\sqrt {b} (-3 a+2 b) \text {ArcTan}\left (\frac {\sqrt {a-b} \tanh (c+d x)}{\sqrt {b}}\right )\right ) \cosh (2 (c+d x))+a \sqrt {a-b} b \sinh (2 (c+d x))\right )}{8 a^2 (a-b)^{3/2} d \left (a+b \text {csch}^2(c+d x)\right )^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(314\) vs.
\(2(88)=176\).
time = 1.98, size = 315, normalized size = 3.15
method | result | size |
derivativedivides | \(\frac {\frac {2 b \left (\frac {\frac {a \left (\tanh ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{8 a -8 b}+\frac {a \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )}{8 a -8 b}}{\frac {b \left (\tanh ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{4}+a \left (\tanh ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-\frac {b \left (\tanh ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2}+\frac {b}{4}}+\frac {2 \left (3 a -2 b \right ) b \left (-\frac {\left (\sqrt {a \left (a -b \right )}-a \right ) \arctanh \left (\frac {b \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )}{\sqrt {\left (2 \sqrt {a \left (a -b \right )}-2 a +b \right ) b}}\right )}{2 \sqrt {a \left (a -b \right )}\, b \sqrt {\left (2 \sqrt {a \left (a -b \right )}-2 a +b \right ) b}}+\frac {\left (\sqrt {a \left (a -b \right )}+a \right ) \arctan \left (\frac {b \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )}{\sqrt {\left (2 \sqrt {a \left (a -b \right )}+2 a -b \right ) b}}\right )}{2 \sqrt {a \left (a -b \right )}\, b \sqrt {\left (2 \sqrt {a \left (a -b \right )}+2 a -b \right ) b}}\right )}{4 a -4 b}\right )}{a^{2}}+\frac {\ln \left (\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{a^{2}}-\frac {\ln \left (\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{a^{2}}}{d}\) | \(315\) |
default | \(\frac {\frac {2 b \left (\frac {\frac {a \left (\tanh ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{8 a -8 b}+\frac {a \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )}{8 a -8 b}}{\frac {b \left (\tanh ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{4}+a \left (\tanh ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-\frac {b \left (\tanh ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2}+\frac {b}{4}}+\frac {2 \left (3 a -2 b \right ) b \left (-\frac {\left (\sqrt {a \left (a -b \right )}-a \right ) \arctanh \left (\frac {b \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )}{\sqrt {\left (2 \sqrt {a \left (a -b \right )}-2 a +b \right ) b}}\right )}{2 \sqrt {a \left (a -b \right )}\, b \sqrt {\left (2 \sqrt {a \left (a -b \right )}-2 a +b \right ) b}}+\frac {\left (\sqrt {a \left (a -b \right )}+a \right ) \arctan \left (\frac {b \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )}{\sqrt {\left (2 \sqrt {a \left (a -b \right )}+2 a -b \right ) b}}\right )}{2 \sqrt {a \left (a -b \right )}\, b \sqrt {\left (2 \sqrt {a \left (a -b \right )}+2 a -b \right ) b}}\right )}{4 a -4 b}\right )}{a^{2}}+\frac {\ln \left (\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{a^{2}}-\frac {\ln \left (\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{a^{2}}}{d}\) | \(315\) |
risch | \(\frac {x}{a^{2}}+\frac {b \left (a \,{\mathrm e}^{2 d x +2 c}-2 b \,{\mathrm e}^{2 d x +2 c}-a \right )}{a^{2} \left (a -b \right ) d \left (a \,{\mathrm e}^{4 d x +4 c}-2 a \,{\mathrm e}^{2 d x +2 c}+4 b \,{\mathrm e}^{2 d x +2 c}+a \right )}+\frac {3 \sqrt {-b \left (a -b \right )}\, \ln \left ({\mathrm e}^{2 d x +2 c}-\frac {2 \sqrt {-b \left (a -b \right )}+a -2 b}{a}\right )}{4 \left (a -b \right )^{2} d a}-\frac {\sqrt {-b \left (a -b \right )}\, \ln \left ({\mathrm e}^{2 d x +2 c}-\frac {2 \sqrt {-b \left (a -b \right )}+a -2 b}{a}\right ) b}{2 \left (a -b \right )^{2} d \,a^{2}}-\frac {3 \sqrt {-b \left (a -b \right )}\, \ln \left ({\mathrm e}^{2 d x +2 c}+\frac {2 \sqrt {-b \left (a -b \right )}-a +2 b}{a}\right )}{4 \left (a -b \right )^{2} d a}+\frac {\sqrt {-b \left (a -b \right )}\, \ln \left ({\mathrm e}^{2 d x +2 c}+\frac {2 \sqrt {-b \left (a -b \right )}-a +2 b}{a}\right ) b}{2 \left (a -b \right )^{2} d \,a^{2}}\) | \(324\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: ValueError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 729 vs.
\(2 (88) = 176\).
time = 0.43, size = 1747, normalized size = 17.47 \begin {gather*} \text {Too large to display} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {1}{\left (a + b \operatorname {csch}^{2}{\left (c + d x \right )}\right )^{2}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.49, size = 166, normalized size = 1.66 \begin {gather*} -\frac {\frac {{\left (3 \, a b - 2 \, b^{2}\right )} \arctan \left (\frac {a e^{\left (2 \, d x + 2 \, c\right )} - a + 2 \, b}{2 \, \sqrt {a b - b^{2}}}\right )}{{\left (a^{3} - a^{2} b\right )} \sqrt {a b - b^{2}}} - \frac {2 \, {\left (a b e^{\left (2 \, d x + 2 \, c\right )} - 2 \, b^{2} e^{\left (2 \, d x + 2 \, c\right )} - a b\right )}}{{\left (a^{3} - a^{2} b\right )} {\left (a e^{\left (4 \, d x + 4 \, c\right )} - 2 \, a e^{\left (2 \, d x + 2 \, c\right )} + 4 \, b e^{\left (2 \, d x + 2 \, c\right )} + a\right )}} - \frac {2 \, {\left (d x + c\right )}}{a^{2}}}{2 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {1}{{\left (a+\frac {b}{{\mathrm {sinh}\left (c+d\,x\right )}^2}\right )}^2} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________